Skip to content

Add UVI, Lux, and Window Transmission Factor #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 16, 2021
Merged

Add UVI, Lux, and Window Transmission Factor #3

merged 2 commits into from
Mar 16, 2021

Conversation

CedarGroveStudios
Copy link
Contributor

Updated the LTR390 sensor library to include UVI and Lux parameters. The revision also includes a window_factor parameter to accommodate window transmission light loss (defaults to 1.0 = clear or no glass). UVI and Lux values are properly scaled for all gain and resolution settings.

The UVI and Lux calculations were taken directly from the data sheet assuming the sensor is factory calibrated. The UVI and Lux measurements were not verified with a calibrated source.

Use example:

import busio
import board
import adafruit_ltr390

i2c = busio.I2C(board.SCL, board.SDA)
ltr = adafruit_ltr390.LTR390(i2c)

print("UVI: ", ltr.uvi, "Lux: ", ltr.lux)

To set the window transmission factor to other than the default 1.0:

ltr.window_factor = 1.1

@ladyada ladyada merged commit 6cc65a0 into adafruit:main Mar 16, 2021
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Mar 20, 2021
Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 3.5.7 from 3.5.6:
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#128 from adafruit/anecdata-patch-2
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#126 from adafruit/anecdata-patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_LTR390 to 1.1.0 from 1.0.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_LTR390#3 from CedarGroveStudios/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bitmap_Font to 1.3.7 from 1.3.6:
  > Merge pull request adafruit/Adafruit_CircuitPython_Bitmap_Font#41 from jepler/use-bitmaptools-readinto

Updating https://github.com/adafruit/Adafruit_CircuitPython_datetime to 1.1.2 from 1.1.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_datetime#7 from brentru/fix-failing-tests
  > Merge pull request adafruit/Adafruit_CircuitPython_datetime#6 from cognitivegears/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_ImageLoad to 0.14.0 from 0.13.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_ImageLoad#45 from kmatch98/master
  > "Increase duplicate code check threshold "
  > Merge pull request adafruit/Adafruit_CircuitPython_ImageLoad#46 from adafruit/tests-linting

Updating https://github.com/adafruit/Adafruit_CircuitPython_Logging to 1.2.8 from 1.2.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_Logging#18 from dastels/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_Motor to 3.3.0 from 3.2.8:
  > Merge pull request adafruit/Adafruit_CircuitPython_Motor#54 from CedarGroveStudios/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants